package com.gxuwz.attend.dao.admin;

import com.gxuwz.attend.entity.Admin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

@Repository
public class AdminDao {
    @Autowired
    private  JdbcTemplate jdbcTemplate;

    public int updateAdmin(Admin admin) {
        String sql = "UPDATE sys_user SET fullname = ?, password = ?, telephone = ? WHERE userid = ?";
        return  jdbcTemplate.update(sql, admin.getFullname(), admin.getPassword(), admin.getTelephone(), admin.getUserid());
    }
}
